var account = require('../controllers/account')
, usermanage = require('../controllers/usermanage')

exports.account = account;
exports.usermanage = usermanage;

// <script type="text/javascript">
    /*
var Events = {
    bind: function() {
        if(!this.o)this.o = $({});
        this.o.bind.apply(this.o, arguments);
    },
    trigger: function() {
        if(!this.o) this.o = $({});
        this.o.trigger.apply(this.o, arguments)
    }
}
var StateMachine = function() {};
StateMachine.fn = StateMachine.prototype;
$.extend(StateMachine.fn, Events)
StateMachine.fn.add = function(controller) {
    this.bind('change', function(e, current) {
        if(controller == current) {
            controller.activate();
        } else {
            controller.deactivate();
        }
    });

    controller.active = $.proxy(function() {
        this.trigger("change", controller);
    }, this)
}

var con1 = {
    activate:function(){
        console.log('con1 activate');
    },
    deactivate:function(){
        console.log('con1 deactivate');
    }
}
var con2 = {
    activate:function(){
        console.log('con2 activate');
    },
    deactivate:function(){
        console.log('con2 deactivate');
    }
}
var sm = new StateMachine;
sm.add(con1);
sm.add(con2);

con1.active();

// function A(){

// }
// function B(){

// }
// B.prototype = new A;
// console.log(B.prototype);

// A.prototype.add = function(){
//     console.log('add');
// }
// function A(){}
// function B(){}
// var f = function(){}
// f.prototype = A.prototype;
// B.prototype = new f;
// B.prototype.constructor = B;
// console.log(B.prototype);
// console.log(B.prototype.constructor);
// console.log(B.prototype.constructor.prototype);

// A.prototype.add = function(){
//     console.log('add');
// }
function A(){
    // this.color = [1,2]
}
A.prototype.color = [1,2]

function B(){}
B.prototype = new A;

var b1 = new B;
var b2 = new B;
var a1 = new A;
var a2 = new A;
a1.color.push(3)
console.log(a2.color)

*/